Read tha data, load libraries
Build a histogram for the ‘Age’ column.
Color should be determined by ’Issues’column.
Color should be determined by ’Gender’column.
plot_ly(data = pharma,x=~Age,type = "histogram",color =~ Gender)
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Create a plot between ‘Age’ & ‘Gender’ as per the following condition.
Map ‘Age’ on the y-axis.
plot_ly(data = pharma,y=~Age,type = "scatter")
No scatter mode specifed:
Setting the mode to markers
Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
No scatter mode specifed:
Setting the mode to markers
Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
Map ‘Gender’ on the x-axis.
color should be determined by ‘Issues’ column.
Create a box-plot between ‘DrugID’ & ‘Age’
Map ’DrugID’on the x-axis.
Map ‘Age’ on the y-axis
Color should be determined by ’Gender’column.
plot_ly(data = pharma,x=~DrugID,y=~Age,type = "box",color =~Gender)
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
Warning in RColorBrewer::brewer.pal(N, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
LS0tCnRpdGxlOiAiUGxvdGx5IGluIFIiCmF1dGhvcjogIk1vbmFsaXNhIFJveSIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKIyMjIFJlYWQgdGhhIGRhdGEsIGxvYWQgbGlicmFyaWVzCmBgYHtyfQppbnN0YWxsLnBhY2thZ2VzKCJwbG90bHkiKQpsaWJyYX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